const http = require('http')
const querystring = require('querystring')
const url = require('url')
http.createServer(function(req,res){
	let getJson = {}
	getJson = url.parse(req.url,true)
	console.log(getJson.query)
	// if(req.url.indexOf('?') > -1){
	// 	var arr = req.url.split('?');
	// 	var arr1 = arr[1].split('&');
	// 	for(var i = 0; i < arr1.length; i ++){
	// 		let arr2 = arr1[i].split('=');
	// 		getJson[arr2[0]] = arr2[1]
	// 	}
	// 	let json = querystring.parse(req.url.split('?')[1])
	// 	console.log(json.pass)
	// }
	
	res.write('aaa')
	res.end()
}).listen(8080)